<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page isELIgnored="false"%>
<%@ include file="../common/taglibs.jsp"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>

<title>商户信息列表</title>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
<link href="<s:url value="/css/a.css"/>" type="text/css"
	rel="stylesheet" />
<link href="<s:url value="/css/index.css"/>" type="text/css"

	rel="stylesheet" />
	
<script type="text/javascript"
	src="<c:url value="/js/jquery-1.3.2.js" />"></script>
<script type="text/javascript" src="<c:url value="/js/common.js" />"></script>
<script language="javascript" type="text/javascript"
	src="<c:url value="/js/My97DatePicker/WdatePicker.js"/>"></script>
<script language="javascript" type="text/javascript"
	src="${rootPath}/js/My97DatePicker/WdatePicker.js"></script>

<style>
　　　
　　　　　a {
	text-decoration: none
}

　　　　　a:hover {
	color: red;
	text-decoration: none
}

a:VISITED {
	color: red;
}
　　


　　　
</style>

<script type="text/javascript">

	$(document).ready(function() {	
	
			});

	
</script>



</head>

<body>

	<div class="subpage">
		<s:form id="queryUserForm" action="/merchantTrans/queryMerchantTrans.ct" method="post"
			theme="simple">
			<div class="user_title">
	    		 <h2 class="headline-inquires">POS收单运营管理平台<br />
	    		 <span class="sub-title">

	    		 </span></h2>
	    		</div>
			<table width="120%" cellpadding="0" cellspacing="0" border="0"
				class="query_table">

				<tr>
					<td colspan="4" align="center">
						<h2 class="headline-inquires">
							商户交易统计<br />
							<span class="sub-title"></span>
						</h2>

					</td>
				</tr>


				<tr>
					<td colspan="4">&nbsp;</td>
				</tr>
				<tr>
				 <td align="right" width="15%">所属机构：</td>
				 <td>
				<s:select cssClass="queryWidth" name="searchCondition.orgCode"
								list="#request.orgList" listKey="org_code" listValue="org_name" headerKey="99" headerValue="--请选择--" />
				</td></tr>
				<tr>
					<td align="right">商户号：</td>
					<td align="left" colspan="1"><s:textfield id="merchantNo"
							name="searchCondition.merchantNO" cssClass="queryWidth" /></td>
					
				 <td align="right">交易起始日期：</td>
					<td align="left" colspan="1"><s:textfield id="minDate"
							name="searchCondition.minDate"
							onFocus="WdatePicker({dateFmt:'yyyyMMdd',readOnly:true,wdate:true,errDealMode:0});"
							theme="simple" cssClass="queryWidth" /> 至：<s:textfield id="maxDate" 
							name="searchCondition.maxDate"
							onFocus="WdatePicker({dateFmt:'yyyyMMdd',readOnly:true,wdate:true,errDealMode:0});"
							theme="simple" cssClass="queryWidth" /><font color="red">*</font> </td>	
			   <tr>
               
				<td align="right">交易金额范围：</td>
					<td align="left" colspan="1">
					<s:select cssClass="queryWidth" name="searchCondition.moneyRange"
								id="moneyRange"
								list="#{'0':'不限','1':'1-2万','2':'2-3万','3':'3-4万','4':'4万以上'}"  />  
				<td align="right">所属地区：</td>
				<td align="left" colspan="1">
					<s:select cssClass="queryWidth" name="searchCondition.areaCode"
							list="#request.areaList" listKey="key" listValue="value"  headerKey="99" headerValue="--请选择--" />
					</td>	
			</tr>
				<tr>	
					<td align="right">行业：</td>
					<td align="left" colspan="1"><s:select cssClass="queryWidth" name="searchCondition.mccType"
							list="#request.mccTypeList" listKey="key" listValue="value"  headerKey="99" headerValue="--请选择--" />
					</td>
							<td align="right">mcc编码：</td>
					<td align="left" >
						<s:textfield name="searchCondition.mcc" cssClass="queryWidth" />
					</td>
				</tr>
				
				<tr>
						<td colspan="4" align="center"><span style="font-color: red"><s:actionerror /></span>
							<span style="font-color: red;"><s:actionmessage /></span > <span style="font-color: red;"><s:fielderror
									cssClass="fieldError" /></span>
							<span id="otherError"></span>
						</td>
					</tr>
				<tr>
					<td colspan="4" align="right"><s:submit id="query" value="查 询" />
						&nbsp;&nbsp;&nbsp;&nbsp; <s:reset value="取 消" />&nbsp;&nbsp;&nbsp;&nbsp; </td>
				</tr>
				
				<tr>
					<td colspan="4">&nbsp;</td>
				</tr>
			</table>
			<table width="100%" cellpadding="0" cellspacing="0" border="0">

				<tr>
					<td colspan="4" align="center">
						<h2 class="headline-inquires">大额交易查询列表</h2>

					</td>
				</tr>
				<s:if
					test="#request.searchRsList != null && #request.searchRsList.size>0">
					<tr>
						<td align="left">&nbsp;&nbsp;&nbsp;&nbsp; <page:pageCount
								max_pages="11" totalPage="${requestScope.totalPage}"
								currentPage="${requestScope.currentPage}"
								action="${rootPath}/merchantTrans/queryMerchantTrans.ct?currentPage=" />

						</td>
					</tr>
				</s:if>
			</table>
		</s:form>
			<table id="tableList" width="130%" class="table">
				<thead>
					<tr>
					    <th>所属机构号</th>
						<th>商户号</th>
						<th>商户名称</th>
						<th>行业类型</th>
						<th>mcc码</th>
						<th>所属地区</th>			
						<th>总交易金额 (元)</th>
						<th>总手续费 (元)</th>
						<th>总笔数</th>
						<th>平均交易金额 (元)</th>
						<th>交易日期</th>
						
					</tr>
				</thead>
				<tbody>
					<s:iterator value="#request.tranList" status="stat" id="sh">
							<tr class="<s:if test="#stat.index%2==0">tr_0</s:if>" >
							<td><s:property value="#sh.orgCode"/></td>
							<td>
								<s:a href="transDetail.ct?transReport.id=%{#sh.id}"><s:property value="#sh.merchantNo"/></s:a >
							</td>
							<td >
							<s:a href="merchantDetail.ct?transReport.merchantNo=%{#sh.merchantNo}"><s:property value="#sh.merName"/></s:a ></td>
					       <td><s:property value="#sh.mccType"/></td>
					       <td><s:property value="#sh.mcc"/></td>
					       <td><s:property value="#sh.areaCode"/></td>
					       <td><page:amount amount="${sh.totalAmt}"/></td>
					      <td><page:amount amount="${sh.totalFee}"/></td>
					       <td><s:property value="#sh.totalNum"/></td>
					         <td><page:amount amount="${sh.avgAmt}"/></td>
					       <td><s:property value="#sh.transDate"/></td>
					     
						</s:iterator>
				</tbody>
			</table>
	</div>
	<s:if test="#request.msg !=null">
		<script language="javascript">
			alert("${request.msg}");
		</script>
	</s:if>
</body>
</html>
